home *** CD-ROM | disk | FTP | other *** search
- // Borland C++ Builder
- // Copyright (c) 1995, 1998 by Borland International
- // All rights reserved
-
- // (DO NOT EDIT: machine generated header) 'NSApi.pas' rev: 3.00
-
- #ifndef NSApiHPP
- #define NSApiHPP
- #include <WinSock.hpp>
- #include <Windows.hpp>
- #include <SysInit.hpp>
- #include <System.hpp>
-
- //-- user supplied -----------------------------------------------------------
- namespace Nsapi
- {
- struct TSession;
- char *servact_translate_uri(char *uri, TSession *sn);
- }
-
- namespace Nsapi
- {
- //-- type declarations -------------------------------------------------------
- typedef void *PASSWD;
-
- typedef void * *PPASSWD;
-
- typedef char *TCAddr;
-
- typedef char *caddr_t;
-
- typedef void __cdecl (*TAtRestart)(void * Data);
-
- typedef void __cdecl (*TMagnusAtRestart)(void * Data);
-
- typedef void __cdecl (*TDaemonAtRestart)(void * Data);
-
- typedef void *pool_handle_t;
-
- typedef void *TPoolHandle;
-
- typedef void * *PPoolHandle;
-
- typedef int Semaphore;
-
- typedef void *CRITICAL;
-
- typedef void *CONDVAR;
-
- struct TFile
- {
- int fh;
- char *fname;
- int flsem;
- } ;
-
- typedef TFile *SYS_FILE;
-
- typedef TFile file_s;
-
- typedef int pid_t;
-
- typedef int TPid;
-
- struct TStat;
- typedef TStat *PStat;
-
- struct TStat
- {
- Word st_dev;
- Word st_ino;
- Word st_mode;
- short st_nlink;
- short st_uid;
- short st_gid;
- Word st_rdev;
- int st_size;
- int st_atime;
- int st_mtime;
- int st_ctime;
- } ;
-
- typedef TStat Stat;
-
- #pragma pack(push, 1)
- struct TDirEnt
- {
- char *d_name;
- } ;
- #pragma pack(pop)
-
- typedef TDirEnt *PDirEnt;
-
- typedef TDirEnt dirent_s;
-
- struct TDir;
- typedef TDir *PDir;
-
- struct TDir
- {
- int dp;
- _WIN32_FIND_DATAA fdata;
- TDirEnt de;
- } ;
-
- typedef TDir dir_s;
-
- typedef TDir *SYS_DIR;
-
- typedef TDir SYS_DIRENT;
-
- struct tm
- {
- int tm_sec;
- int tm_min;
- int tm_hour;
- int tm_mday;
- int tm_mon;
- int tm_year;
- int tm_wday;
- int tm_yday;
- int tm_isdst;
- } ;
-
- typedef tm *ptm;
-
- struct TPbParam
- {
- char *name;
- char *value;
- } ;
-
- typedef TPbParam *PPbParam;
-
- typedef TPbParam pb_param;
-
- struct TPbEntry;
- typedef TPbEntry *PPbEntry;
-
- struct TPbEntry
- {
- TPbParam *param;
- TPbEntry *next;
- } ;
-
- typedef TPbEntry pb_entry;
-
- typedef PPbEntry *PPPbEntry;
-
- struct TPblock;
- typedef TPblock *PPblock;
-
- struct TPblock
- {
- int hsize;
- PPbEntry *ht;
- } ;
-
- typedef TPblock pblock;
-
- typedef char *TPCharArray[134217727];
-
- typedef TPCharArray *PPCharArray;
-
- typedef int SYS_NETFD;
-
- struct TFileBuffer
- {
- TFile *fd;
- int fdmap;
- char *fp;
- int len;
- char *inbuf;
- int cursize;
- int pos;
- char *errmsg;
- } ;
-
- typedef TFileBuffer *PFileBuffer;
-
- typedef TFileBuffer filebuffer;
-
- typedef TFileBuffer filebuf;
-
- struct TNetBuf;
- typedef TNetBuf *PNetBuf;
-
- struct TNetBuf
- {
- int sd;
- int pos;
- int cursize;
- int maxsize;
- int rdtimeout;
- char address[64];
- char *inbuf;
- char *errmsg;
- } ;
-
- typedef TNetBuf netbuf;
-
- struct TSession;
- typedef TSession *PSession;
-
- struct TSession
- {
- TPblock *client;
- int csd;
- TNetBuf *inbuf;
- int csd_open;
- in_addr iaddr;
- void * *pool;
- void *clauth;
- } ;
-
- typedef TSession Session;
-
- struct TCInfo
- {
- char *ctype;
- char *encoding;
- char *language;
- } ;
-
- typedef TCInfo *PCInfo;
-
- typedef TCInfo cinfo;
-
- struct TShMem
- {
- void *data;
- int fdmap;
- int size;
- char *name;
- TFile *fd;
- } ;
-
- typedef TShMem *PShMem;
-
- typedef TShMem shmem_s;
-
- typedef void *SYS_THREAD;
-
- typedef void __cdecl (*TSysThreadFunc)(void * Arg);
-
- struct TMultipleDomains
- {
- char *address;
- char *docroot;
- int sd;
- int threads;
- int AddressNumber;
- } ;
-
- typedef TMultipleDomains *PMultipleDomains;
-
- typedef TMultipleDomains multiple_domains;
-
- typedef void __cdecl (*TChildCallback)(PSession sn);
-
- typedef void __cdecl (*TRotateCallback)(void);
-
- typedef void __cdecl (*TRCBack)(int Param);
-
- struct TDaemon
- {
- char *ipstr;
- int port;
- TChildCallback child_callback;
- TRotateCallback rotate_callback;
- char *servid;
- TMultipleDomains *domains;
- TRCBack rcback;
- int maxprocs;
- int minprocs;
- int proclife;
- int maxthreads;
- int minthreads;
- } ;
-
- typedef TDaemon *PDaemon;
-
- typedef TDaemon daemon_s;
-
- struct TDirective
- {
- TPblock *param;
- TPblock *client;
- } ;
-
- typedef TDirective *PDirective;
-
- typedef TDirective directive;
-
- struct TDtable
- {
- int ni;
- TDirective *inst;
- } ;
-
- typedef TDtable *PDtable;
-
- typedef TDtable dtable;
-
- struct THttpdObject
- {
- TPblock *name;
- int nd;
- TDtable *dt;
- } ;
-
- typedef THttpdObject *PHttpdObject;
-
- typedef THttpdObject httpd_object;
-
- struct THttpdObjSet;
- typedef THttpdObjSet *PHttpdObjSet;
-
- struct THttpdObjSet
- {
- int pos;
- PHttpdObject *obj;
- PPblock *initfns;
- } ;
-
- typedef THttpdObjSet httpd_objset;
-
- struct TConfGlobalVars
- {
- int Vport;
- char *Vaddr;
- void * *Vuserpw;
- char *Vchr;
- char *Vpidfn;
- int Vpool_max;
- int Vpool_min;
- int Vpool_life;
- int Vpool_maxthreads;
- int Vpool_minthreads;
- char *Vserver_hostname;
- char *Vroot_object;
- THttpdObjSet *Vstd_os;
- void *Vacl_root;
- char *Vmaster_error_log;
- char *Vserver_root;
- char *Vserver_id;
- } ;
-
- typedef TConfGlobalVars *PConfGlobalVars;
-
- typedef TConfGlobalVars conf_global_vars_s;
-
- struct TRequest;
- typedef TRequest *PRequest;
-
- struct TRequest
- {
- TPblock *vars;
- TPblock *reqpb;
- int loadhdrs;
- TPblock *headers;
- int senthdrs;
- TPblock *srvhdrs;
- THttpdObjSet *os;
- THttpdObjSet *tmpos;
- char *statpath;
- char *staterr;
- TStat *finfo;
- int aclstate;
- int acldirno;
- char *aclname;
- TPblock *aclpb;
- BOOL request_is_cacheable;
- BOOL directive_is_cacheable;
- char *cached_headers;
- int cached_headers_len;
- char *cached_date_header;
- } ;
-
- typedef TRequest Request;
-
- typedef int __cdecl (*TFunction)(PPblock pb, PSession sn, PRequest rq);
-
- struct TFuncStruct;
- typedef TFuncStruct *PFuncStruct;
-
- struct TFuncStruct
- {
- char *name;
- TFunction func;
- TFuncStruct *next;
- } ;
-
- //-- var, const, procedure ---------------------------------------------------
- #define PROXY_VERSION_DEF "2.0b4"
- #define PROXY_VERSION_STRING "Netscape-Proxy/2.0b4"
- #define ADMSERV_VERSION_DEF "2.0"
- #define ADMSERV_VERSION_STRING "Netscape-Administrator/2.0"
- #define PERSONAL_VERSION_DEF "2.0b4"
- #define PERSONAL_VERSION_STRING "Netscape-FastTrack/2.0b4"
- #define CATALOG_VERSION_DEF "1.0b2"
- #define CATALOG_VERSION_STRING "Netscape-Catalog/1.0b2"
- #define RDS_VERSION_DEF "1.0b2"
- #define RDS_VERSION_STRING "Netscape-RDS/1.0b2"
- #define ENTERPRISE_VERSION_DEF "2.0b4"
- #define ENTERPRISE_VERSION_STRING "Netscape-Enterprise/2.0b4"
- #define NEWS_VERSION_STRING "Netscape 1.1"
- #define BATMAN_VERSION_DEF "1.0a1"
- #define BATMAN_VERSION_STRING "Batman/1.0a1"
- #define DAEMON_LISTEN_SIZE (Byte)(100)
- #define MAGNUS_ERROR_LEN (Word)(8192)
- #define CR (Byte)(13)
- #define LF (Byte)(10)
- #define ENDLINE "\r\n"
- #define ENTERPRISE_VERSION (Byte)(1)
- #define PERSONAL_VERSION (Byte)(2)
- #define CATALOG_VERSION (Byte)(3)
- #define RDS_VERSION (Byte)(4)
- #define SEM_ERROR (Byte)(0)
- #define SEM_MAXVALUE (Word)(32767)
- #define IO_OKAY (Byte)(1)
- #define IO_ERROR (Shortint)(-1)
- #define IO_EOF (Byte)(0)
- #define FILE_BUFFERSIZE (Word)(4096)
- #define SYS_ERROR_FD (void *)(0x0)
- #define SYS_STDERR (void *)(0x0)
- #define ERROR_PIPE (Word)(767)
- #define FILE_PATHSEP (char)(47)
- #define FILE_PARENT "..\\"
- #define NET_BUFFERSIZE (Word)(8192)
- #define NET_READ_TIMEOUT (Byte)(120)
- #define NET_WRITE_TIMEOUT (Word)(300)
- #define NET_INFINITE_TIMEOUT (Byte)(0)
- #define NET_ZERO_TIMEOUT (Shortint)(-1)
- #define SSL_HANDSHAKE_TIMEOUT (Word)(300)
- #define SYS_NET_ERRORFD (Shortint)(-1)
- #define SESSION_HASHSIZE (Byte)(5)
- #define MCC_MT_MAGIC "#--Mosaic Communications Corporation MIME Information"
- #define MCC_MT_MAGIC_LEN (Byte)(53)
- #define NCC_MT_MAGIC "#--Netscape Communications Corporation MIME Information"
- #define NCC_MT_MAGIC_LEN (Byte)(55)
- #define CINFO_SEPARATOR (char)(46)
- #define CINFO_MAX_LEN (Word)(1024)
- #define CINFO_HASHSIZE (Byte)(27)
- #define MAX_ERROR_LEN (Word)(8192)
- #define LOG_WARN (Byte)(0)
- #define LOG_MISCONFIG (Byte)(1)
- #define LOG_SECURITY (Byte)(2)
- #define LOG_FAILURE (Byte)(3)
- #define LOG_CATASTROPHE (Byte)(4)
- #define LOG_INFORM (Byte)(5)
- #define ERR_TIMEFMT "[%d/%b/%Y:%H:%M:%S]"
- #define ERRORS_TO_SYSLOG (Shortint)(-1)
- #define NON_SXP (Shortint)(-1)
- #define INVALID_SXP (Shortint)(-2)
- #define VALID_SXP (Byte)(1)
- #define NON_WILDPAT (Shortint)(-1)
- #define INVALID_WILDPAT (Shortint)(-2)
- #define VALID_WILDPAT (Byte)(1)
- #define NON_REGEXP (Shortint)(-1)
- #define INVALID_REGEXP (Shortint)(-2)
- #define VALID_REGEXP (Byte)(1)
- #define SYS_THREAD_ERROR (void *)(0x0)
- #define SYSTHREAD_DEFAULT_PRIORITY (Byte)(16)
- #define CHILD_EMPTY_SLOT (Byte)(254)
- #define CHILD_AWAIT_CONNECT (Byte)(255)
- #define CHILD_PROCESSING (Byte)(0)
- #define CHILD_READING (Byte)(1)
- #define CHILD_WRITING (Byte)(2)
- #define CHILD_RESOLVING (Byte)(3)
- #define CHILD_DONE_PROCESSING (Byte)(20)
- #define CHILD_DONE_READING (Byte)(21)
- #define CHILD_DONE_WRITING (Byte)(22)
- #define CHILD_DONE_RESOLVING (Byte)(23)
- #define MAX_IP_DOMAINS (Word)(256)
- #define OBJSET_INCSIZE (Byte)(8)
- #define MAX_DIRECTIVE_LEN (Word)(800)
- #define PARAMETER_HASH_SIZE (Byte)(3)
- #define CONF_MAXLEN (Word)(16384)
- #define DEFAULT_PORT (Byte)(80)
- #define DEFAULT_POOL_MAX (Byte)(50)
- #define REQ_HASHSIZE (Byte)(10)
- #define REQ_MAX_LINE (Word)(4096)
- #define REQ_PROCEED (Byte)(0)
- #define REQ_ABORTED (Shortint)(-1)
- #define REQ_NOACTION (Shortint)(-2)
- #define REQ_EXIT (Shortint)(-3)
- #define REQ_RESTART (Shortint)(-4)
- #define HTTP_DATE_LEN (Byte)(128)
- #define HTTP_DATE_FMT "%A, %d-%b-%y %H:%M:%S GMT"
- #define HTTP_DEFAULT_KEEPALIVE_TIMEOUT (Byte)(15)
- #define HTTP_MAX_HEADERS (Byte)(200)
- #define PROTOCOL_OK (Byte)(200)
- #define PROTOCOL_CREATED (Byte)(201)
- #define PROTOCOL_NO_RESPONSE (Byte)(204)
- #define PROTOCOL_PARTIAL_CONTENT (Byte)(206)
- #define PROTOCOL_REDIRECT (Word)(302)
- #define PROTOCOL_NOT_MODIFIED (Word)(304)
- #define PROTOCOL_BAD_REQUEST (Word)(400)
- #define PROTOCOL_UNAUTHORIZED (Word)(401)
- #define PROTOCOL_FORBIDDEN (Word)(403)
- #define PROTOCOL_NOT_FOUND (Word)(404)
- #define PROTOCOL_PROXY_UNAUTHORIZED (Word)(407)
- #define PROTOCOL_SERVER_ERROR (Word)(500)
- #define PROTOCOL_NOT_IMPLEMENTED (Word)(501)
- #define HTTP_PORT (Byte)(80)
- #define HTTP_URL "http"
- #define NUM_HASH (Byte)(20)
- extern PACKAGE bool __fastcall server_fasttrack(void);
- extern PACKAGE bool __fastcall server_enterprise(void);
- extern PACKAGE void __fastcall CONVERT_TO_PRINTABLE_FORMAT(char * Filename);
- extern PACKAGE void __fastcall CONVERT_TO_NATIVE_FS(char * Filename);
- extern PACKAGE BOOL __fastcall system_rename(char * Old, char * New);
- extern PACKAGE BOOL __fastcall system_unlink(char * path);
- extern PACKAGE int __fastcall system_lseek(SYS_FILE fd, int off, int wh);
- extern PACKAGE int __fastcall system_flock(SYS_FILE fd);
- extern PACKAGE int __fastcall system_ulock(SYS_FILE fd);
- extern PACKAGE int __fastcall dir_create(char * Path);
- extern PACKAGE int __fastcall dir_remove(char * Path);
- extern PACKAGE PPbParam __fastcall pblock_find(char * name, PPblock pb);
- extern PACKAGE PPbParam __fastcall pblock_remove(char * name, PPblock pb);
- extern PACKAGE int __fastcall netbuf_getc(PNetBuf b);
- extern PACKAGE int __fastcall filebuf_getc(PFileBuffer b);
- extern PACKAGE int __fastcall pipebuf_getc(PFileBuffer b);
- extern PACKAGE char * __fastcall session_dns(PSession sn);
- extern PACKAGE char * __fastcall session_maxdns(PSession sn);
- extern PACKAGE char __fastcall CINFO_HASH(char * s);
- extern PACKAGE int __fastcall request_loadheaders(PSession sn, PRequest rq);
- extern PACKAGE PPASSWD __fastcall userpw(void);
- extern PACKAGE int __fastcall pool_max(void);
- extern PACKAGE int __fastcall pool_min(void);
- extern PACKAGE int __fastcall pool_life(void);
- extern PACKAGE int __fastcall pool_maxthreads(void);
- extern PACKAGE int __fastcall pool_minthreads(void);
- extern PACKAGE char * __fastcall server_hostname(void);
- extern PACKAGE char * __fastcall root_object(void);
- extern PACKAGE PHttpdObjSet __fastcall std_os(void);
- extern PACKAGE void * __fastcall acl_root(void);
- extern PACKAGE char * __fastcall master_error_log(void);
- extern PACKAGE char * __fastcall server_root(void);
- extern PACKAGE char * __fastcall server_id(void);
- extern PACKAGE System::AnsiString __fastcall NSstr2String(char * nsStr);
- extern "C" int __cdecl strcasecmp(char * s1, char * s2);
- extern "C" int __cdecl strncasecmp(char * s1, char * s2, int n);
- extern "C" int __cdecl util_strcasecmp(char * s1, char * s2);
- extern "C" int __cdecl util_strncasecmp(char * s1, char * s2, int n);
- extern "C" char * __cdecl system_version(void);
- extern "C" char * __cdecl MAGNUS_VERSION_STRING(void);
- extern "C" void __cdecl system_version_set(char * ptr);
- extern "C" void * __cdecl MALLOC(int size);
- extern "C" void * __cdecl system_malloc(int size);
- extern "C" void * __cdecl CALLOC(int size);
- extern "C" void * __cdecl system_calloc(int size);
- extern "C" void * __cdecl REALLOC(void * ptr, int size);
- extern "C" void * __cdecl system_realloc(void * ptr, int size);
- extern "C" void __cdecl FREE(void * ptr);
- extern "C" void __cdecl system_free(void * ptr);
- extern "C" char * __cdecl STRDUP(char * ptr);
- extern "C" char * __cdecl system_strdup(char * ptr);
- extern "C" void * __cdecl PERM_MALLOC(int size);
- extern "C" void * __cdecl system_malloc_perm(int size);
- extern "C" void * __cdecl PERM_CALLOC(int size);
- extern "C" void * __cdecl system_calloc_perm(int size);
- extern "C" void * __cdecl PERM_REALLOC(void * ptr, int size);
- extern "C" void * __cdecl system_realloc_perm(void * ptr, int size);
- extern "C" void __cdecl PERM_FREE(void * ptr);
- extern "C" void __cdecl system_free_perm(void * ptr);
- extern "C" char * __cdecl PERM_STRDUP(char * ptr);
- extern "C" char * __cdecl system_strdup_perm(char * ptr);
- extern "C" void __cdecl magnus_atrestart(TAtRestart fn, void * data);
- extern "C" PPoolHandle __cdecl pool_create(void);
- extern "C" void __cdecl pool_destroy(PPoolHandle pool_handle);
- extern "C" BOOL __cdecl pool_enabled(void);
- extern "C" void * __cdecl pool_malloc(PPoolHandle pool_handle, int size);
- extern "C" void __cdecl pool_free(PPoolHandle pool_handle, void * ptr);
- extern "C" void * __cdecl pool_calloc(PPoolHandle pool_handle, int nelem, int elsize);
- extern "C" void * __cdecl pool_realloc(PPoolHandle pool_handle, void * ptr, int size);
- extern "C" char * __cdecl pool_strdup(PPoolHandle pool_handle, char * orig_str);
- extern "C" int __cdecl sem_init(char * name, int Number);
- extern "C" void __cdecl sem_terminate(int id);
- extern "C" int __cdecl sem_grab(int id);
- extern "C" int __cdecl sem_tgrab(int id);
- extern "C" int __cdecl sem_release(int id);
- extern "C" void * __cdecl crit_init(void);
- extern "C" void __cdecl crit_enter(void * id);
- extern "C" void __cdecl crit_exit(void * id);
- extern "C" void __cdecl crit_terminate(void * id);
- extern "C" void * __cdecl condvar_init(void * id);
- extern "C" void __cdecl condvar_wait(void * cv);
- extern "C" void __cdecl condvar_notify(void * cv);
- extern "C" void __cdecl condvar_terminate(void * cv);
- extern "C" BOOL __stdcall system_chdir(char * Path);
- extern "C" int __cdecl system_stat(char * name, TStat &finfo);
- extern "C" int __cdecl system_fread(SYS_FILE fd, void * buf, int sz);
- extern "C" int __cdecl system_pread(SYS_FILE fd, void * buf, int sz);
- extern "C" SYS_FILE __cdecl system_fopenRO(char * path);
- extern "C" SYS_FILE __cdecl system_fopenWA(char * path);
- extern "C" SYS_FILE __cdecl system_fopenRW(char * path);
- extern "C" SYS_FILE __cdecl system_fopenWT(char * path);
- extern "C" void __cdecl system_fclose(SYS_FILE fd);
- extern "C" int __cdecl system_nocoredumps(void);
- extern "C" char * __cdecl system_winsockerr(void);
- extern "C" char * __cdecl system_winerr(void);
- extern "C" int __cdecl system_fwrite(SYS_FILE fd, void * buf, int sz);
- extern "C" int __cdecl system_fwrite_atomic(SYS_FILE fd, void * buf, int sz);
- extern "C" int __cdecl file_notfound(void);
- extern "C" char * __cdecl system_errmsg(void);
- extern "C" char * __cdecl system_errmsg_fn(void);
- extern "C" int __cdecl system_initlock(SYS_FILE fd);
- extern "C" int __cdecl file_setinherit(SYS_FILE fd, int value);
- extern "C" void __cdecl file_unix2local(char * path, char * p2);
- extern "C" PDir __cdecl dir_open(char * path);
- extern "C" PDirEnt __cdecl dir_read(PDir ds);
- extern "C" void __cdecl dir_close(PDir ds);
- extern "C" int __cdecl dir_create_all(char * dir);
- extern "C" PPbParam __cdecl param_create(char * name, char * value);
- extern "C" int __cdecl param_free(PPbParam pp);
- extern "C" PPblock __cdecl pblock_create(int n);
- extern "C" void __cdecl pblock_free(PPblock pb);
- extern "C" char * __cdecl pblock_findval(char * name, PPblock pb);
- extern "C" PPbParam __cdecl pblock_nvinsert(char * name, char * value, PPblock pb);
- extern "C" PPbParam __cdecl pblock_nninsert(char * name, int value, PPblock pb);
- extern "C" void __cdecl pblock_pinsert(PPbParam pp, PPblock pb);
- extern "C" int __cdecl pblock_str2pblock(char * str, PPblock pb);
- extern "C" char * __cdecl pblock_pblock2str(PPblock pb, char * str);
- extern "C" void __cdecl pblock_copy(PPblock src, PPblock dst);
- extern "C" PPblock __cdecl pblock_dup(PPblock src);
- extern "C" PPCharArray __fastcall pblock_pb2env(PPblock pb, PPCharArray env);
- extern PACKAGE PPbParam __cdecl _pblock_fr(char * name, PPblock pb, BOOL remove);
- extern "C" int __cdecl net_socket(int domain, int nettype, int protocol);
- extern "C" int __cdecl net_getsockopt(int s, int level, int optname, void * optval, int &optlen);
- extern "C" int __cdecl net_setsockopt(int s, int level, int optname, void * optval, int optlen);
- extern "C" int __cdecl net_listen(int s, int backlog);
- extern "C" int __cdecl net_create_listener(char * ipaddr, int port);
- extern "C" int __cdecl net_select(int nfds, Winsock::PFDSet r, Winsock::PFDSet w, Winsock::PFDSet e,
- Winsock::PTimeVal timeout);
- extern "C" int __cdecl net_connect(int s, void * sockaddr, int namelen);
- extern "C" int __cdecl net_ioctl(int s, int tag, void * result);
- extern "C" int __cdecl net_getpeername(int s, sockaddr_in &name, int &namelen);
- extern "C" int __cdecl net_close(int s);
- extern "C" int __cdecl net_bind(int s, sockaddr_in &name, int namelen);
- extern "C" int __cdecl net_accept(int s, PSOCKADDR addr, Windows::PInteger addrlen);
- extern "C" int __cdecl net_read(int sd, char * buf, int sz, int timeout);
- extern "C" int __cdecl net_write(int sd, char * buf, int sz);
- extern "C" BOOL __cdecl net_isalive(int sd);
- extern "C" char * __cdecl net_ip2host(char * ip, BOOL verify);
- extern "C" PFileBuffer __cdecl filebuf_open(SYS_FILE fd, int sz);
- extern "C" PNetBuf __cdecl netbuf_open(int sd, int sz);
- extern "C" PFileBuffer __cdecl filebuf_create(SYS_FILE fd, char * mmap_ptr, int mmap_len, int bufsz)
- ;
- extern "C" void __cdecl filebuf_close_buffer(PFileBuffer buf, BOOL clean_mmap);
- extern "C" PFileBuffer __cdecl filebuf_open_nostat(SYS_FILE fd, int sz, TStat &finfo);
- extern "C" PFileBuffer __cdecl pipebuf_open(SYS_FILE fd, int sz, TStat &finfo);
- extern "C" int __cdecl filebuf_next(PFileBuffer buf, int advance);
- extern "C" int __cdecl netbuf_next(PNetBuf buf, int advance);
- extern "C" int __cdecl pipebuf_next(PFileBuffer buf, int advance);
- extern "C" void __cdecl filebuf_close(PFileBuffer buf);
- extern "C" void __cdecl netbuf_close(PNetBuf buf);
- extern "C" void __cdecl pipebuf_close(PFileBuffer buf);
- extern "C" int __cdecl filebuf_grab(PFileBuffer buf, int sz);
- extern "C" int __cdecl netbuf_grab(PNetBuf buf, int sz);
- extern "C" int __cdecl pipebuf_grab(PFileBuffer buf, int sz);
- extern "C" int __cdecl netbuf_buf2sd(PNetBuf buf, int sd, int len);
- extern "C" int __cdecl filebuf_buf2sd(PFileBuffer buf, int sd);
- extern "C" int __cdecl pipebuf_buf2sd(PFileBuffer buf, int sd, int len);
- extern "C" int __cdecl pipebuf_netbuf2sd(PNetBuf buf, SYS_FILE sd, int len);
- extern "C" PSession __cdecl session_create(int csd, Winsock::PSockAddrIn sac);
- extern "C" void __fastcall session_free(PSession sn);
- extern "C" char * __cdecl session_dns_lookup(PSession sn, BOOL verify);
- extern "C" void __cdecl cinfo_init(void);
- extern "C" void __cdecl cinfo_terminate(void);
- extern "C" char * __cdecl cinfo_merge(char * fn);
- extern "C" PCInfo __cdecl cinfo_find(char * uri);
- extern "C" PCInfo __cdecl cinfo_lookup(char * ctype);
- extern "C" char * __cdecl ereport_init(char * err_fn, char * email, void * &pw);
- extern "C" void __cdecl ereport_terminate(void);
- extern "C" SYS_FILE __cdecl ereport_getfd(void);
- extern "C" int __cdecl shexp_valid(char * exp);
- extern "C" int __cdecl shexp_match(char * str, char * exp);
- extern "C" int __cdecl shexp_cmp(char * str, char * exp);
- extern "C" int __cdecl shexp_casecmp(char * str, char * exp);
- extern "C" PShMem __cdecl shmem_alloc(char * name, int size, BOOL expose);
- extern "C" void __cdecl shmem_free(PShMem region);
- extern "C" void * __cdecl systhread_start(int prio, int stksz, TSysThreadFunc fn, void * arg);
- extern "C" void * __fastcall systhread_current(void);
- extern "C" void __cdecl systhread_yield(void);
- extern "C" void * __cdecl systhread_attach(void);
- extern "C" void __fastcall systhread_terminate(void * thr);
- extern "C" void __cdecl systhread_sleep(int milliseconds);
- extern "C" void __cdecl systhread_init(char * name);
- extern "C" void __cdecl systhread_timerset(int usec);
- extern "C" int __cdecl systhread_newkey(void);
- extern "C" void * __cdecl systhread_getdata(int key);
- extern "C" void __cdecl systhread_setdata(int key, void * data);
- extern PACKAGE void __cdecl _ntdaemon_run(void * Param);
- extern "C" void __cdecl daemon_atrestart(TAtRestart fn, void * data);
- extern "C" int __fastcall child_fork(void);
- extern "C" int __cdecl util_getline(PFileBuffer buf, int lineno, int maxlen, char * l);
- extern "C" PPCharArray __cdecl util_env_create(PPCharArray env, int n, int &pos);
- extern "C" char * __cdecl util_env_str(char * name, char * value);
- extern "C" void __cdecl util_env_replace(PPCharArray env, char * name, char * value);
- extern "C" void __cdecl util_env_free(PPCharArray env);
- extern "C" PPCharArray __cdecl util_env_copy(PPCharArray src, PPCharArray dst);
- extern "C" char * __cdecl util_env_find(PPCharArray env, char * name);
- extern "C" char * __cdecl util_hostname(void);
- extern "C" int __fastcall util_chdir2path(char * path);
- extern "C" BOOL __cdecl util_is_mozilla(char * ua, char * major, char * minor);
- extern "C" BOOL __cdecl util_is_url(char * url);
- extern "C" BOOL __cdecl util_later_than(tm &lms, char * ims);
- extern "C" BOOL __cdecl util_time_equal(tm &lms, char * ims);
- extern "C" int __cdecl util_str_time_equal(char * t1, char * t2);
- extern "C" BOOL __cdecl util_uri_is_evil(char * t);
- extern "C" void __cdecl util_uri_parse(char * uri);
- extern "C" void __cdecl util_uri_unescape(char * s);
- extern "C" char * __cdecl util_uri_escape(char * d, char * s);
- extern "C" char * __cdecl util_url_escape(char * d, char * s);
- extern "C" char * __cdecl util_sh_escape(char * s);
- extern "C" int __fastcall util_mime_separator(char * sep);
- extern "C" int __fastcall util_itoa(int i, char * a);
- extern "C" void __cdecl util_delete_directory(char * FileName, BOOL delete_directory);
- extern "C" int __cdecl util_strftime(char * s, char * format, tm &t);
- extern "C" PHttpdObject __cdecl object_create(int nd, PPblock name);
- extern "C" void __cdecl object_free(PHttpdObject obj);
- extern "C" void __cdecl object_add_directive(int dc, PPblock p, PPblock c, PHttpdObject obj);
- extern "C" int __cdecl object_execute(PDirective inst, PSession sn, void * rq);
- extern "C" PHttpdObjSet __cdecl objset_scan_buffer(PFileBuffer buf, char * errstr, PHttpdObjSet os);
-
- extern "C" PHttpdObjSet __cdecl objset_create(void);
- extern "C" void __cdecl objset_free(PHttpdObjSet os);
- extern "C" void __cdecl objset_free_setonly(PHttpdObjSet os);
- extern "C" PHttpdObjSet __cdecl objset_new_object(PPblock name, PHttpdObjSet os);
- extern "C" void __cdecl objset_add_object(PHttpdObject obj, PHttpdObjSet os);
- extern "C" void __cdecl objset_add_init(PPblock initfn, PHttpdObjSet os);
- extern "C" PHttpdObject __cdecl objset_findbyname(char * name, PHttpdObjSet ign, PHttpdObjSet os);
- extern "C" PHttpdObject __cdecl objset_findbyppath(char * ppath, PHttpdObjSet ign, PHttpdObjSet os);
-
- extern "C" PHttpdObjSet __cdecl objset_copydirs(PHttpdObjSet dst_os, PHttpdObjSet os, int dir);
- extern "C" PHttpdObjSet __cdecl objset_scan_registry(char * errstr, PHttpdObjSet os, char * product_key
- );
- extern "C" void __cdecl ProcessObject(PHttpdObjSet nos, HKEY hObjectKey, char * Obj, int ObjectIndex
- );
- extern "C" BOOL __cdecl ProcessClient(PHttpdObject cobj, HKEY hObjectKey, char * Client, int ObjectIndex
- );
- extern "C" BOOL __cdecl ProcessDirective(PHttpdObject cobj, PPblock param, PPblock client, HKEY hObjectKey
- , char * Directive, int ObjectIndex, int DirectiveIndex, int &clrefs, BOOL IsObject);
- extern "C" BOOL __cdecl ProcessFunction(PPblock ¶m, HKEY hDirectiveKey, char * Func, int ObjectIndex
- , int DirectiveIndex, int FunctionIndex);
- extern PACKAGE int __cdecl _ntverify_parameter(char * str);
- extern "C" int __cdecl ntpblock_str2pblock(int ParameterIndex, char * name, char * value, int namelength
- , int valuelength, PPblock pb);
- extern "C" int __cdecl ntpblock_pblock2str(PPbEntry p, char * &ParameterName, char * &ParameterValue
- );
- extern "C" BOOL __cdecl ClearConfigurationParameters(HKEY hParentKey, char * CompleteKeyName, char *
- KeyName);
- extern "C" char * __cdecl GetProductKey(void);
- extern "C" char * __cdecl conf_init(char * cfn);
- extern "C" void __cdecl conf_terminate(void);
- extern "C" PConfGlobalVars __cdecl conf_getglobals(void);
- extern "C" void __cdecl conf_vars2daemon(PDaemon d);
- extern "C" BOOL __cdecl GetDomainAddresses(char * ErrMsg);
- extern "C" PRequest __cdecl request_create(void);
- extern "C" void __cdecl request_free(PRequest req);
- extern "C" PRequest __cdecl request_restart_internal(char * uri, PRequest rq);
- extern "C" int __cdecl request_header(char * name, PPCharArray value, PSession sn, PRequest rq);
- extern "C" PStat __cdecl request_stat_path(char * path, PRequest rq);
- extern "C" void __cdecl request_handle(PSession sn);
- extern "C" char * __cdecl request_translate_uri(char * uri, PSession sn);
- extern "C" PRequest __cdecl protocol_find_request(PNetBuf buf, PSession sn, int &reply);
- extern "C" PRequest __cdecl http_find_request(PNetBuf buf, PSession sn, int &reply);
- extern "C" int __cdecl protocol_parse_request(char * t, PRequest rq, PSession sn);
- extern "C" int __cdecl http_parse_request(char * t, PRequest rq, PSession sn);
- extern "C" int __cdecl protocol_scan_headers(PSession sn, PNetBuf buf, char * t, PPblock headers);
- extern "C" int __cdecl http_scan_headers(PSession sn, PNetBuf buf, char * t, PPblock headers);
- extern "C" int __cdecl protocol_start_response(PSession sn, PRequest rq);
- extern "C" int __cdecl http_start_response(PSession sn, PRequest rq);
- extern "C" PPCharArray __cdecl http_hdrs2env(PPblock pb);
- extern "C" void __cdecl protocol_status(PSession sn, PRequest rq, int n, char * r);
- extern "C" void __cdecl http_status(PSession sn, PRequest rq, int n, char * r);
- extern "C" int __cdecl protocol_set_finfo(PSession sn, PRequest rq, TStat &finfo);
- extern "C" int __cdecl http_set_finfo(PSession sn, PRequest rq, TStat &finfo);
- extern "C" char * __cdecl http_dump822(PPblock pb, char * t, int &pos, int tsz);
- extern "C" void __cdecl protocol_finish_request(PSession sn, PRequest rq);
- extern "C" void __cdecl http_finish_request(PSession sn, PRequest rq);
- extern "C" void __cdecl protocol_handle_session(PSession sn);
- extern "C" void __cdecl http_handle_session(PSession sn);
- extern "C" char * __cdecl protocol_uri2url(char * prefix, char * suffix);
- extern "C" char * __cdecl protocol_uri2url_dynamic(char * prefix, char * suffix, PSession sn, PRequest
- rq);
- extern "C" char * __cdecl http_uri2url(char * prefix, char * suffix);
- extern "C" char * __cdecl http_uri2url_dynamic(char * prefix, char * suffix, PSession sn, PRequest rq
- );
- extern "C" void __cdecl protocol_set_keepalive_timeout(int secs);
- extern "C" void __cdecl http_set_keepalive_timeout(int secs);
- extern "C" void __cdecl func_init(void);
- extern "C" TFunction __cdecl func_find(char * name);
- extern "C" int __cdecl func_exec(PPblock pb, PSession sn, PRequest rq);
- extern "C" PFuncStruct __fastcall func_insert(char * name, TFunction fn);
- inline void * __cdecl MALLOC(int size)
- {
- return system_malloc(size);
- }
-
- inline void * __cdecl CALLOC(int size)
- {
- return system_calloc(size);
- }
-
- inline void * __cdecl REALLOC(void * ptr, int size)
- {
- return system_realloc(ptr, size);
- }
-
- inline void __cdecl FREE(void * ptr)
- {
- system_free(ptr);
- }
-
- inline char * __cdecl STRDUP(char * ptr)
- {
- return system_strdup(ptr);
- }
-
- inline void * __cdecl PERM_MALLOC(int size)
- {
- return system_malloc_perm(size);
- }
-
- inline void * __cdecl PERM_CALLOC(int size)
- {
- return system_calloc_perm(size);
- }
-
- inline void * __cdecl PERM_REALLOC(void * ptr, int size)
- {
- return system_realloc_perm(ptr, size);
- }
-
- inline void __cdecl PERM_FREE(void * ptr)
- {
- system_free_perm(ptr);
- }
-
- inline char * __cdecl PERM_STRDUP(char * ptr)
- {
- return system_strdup_perm(ptr);
- }
-
- inline BOOL __stdcall system_chdir(char * Path)
- {
- return SetCurrentDirectory(Path);
- }
-
- inline char * __cdecl system_errmsg(void)
- {
- return system_errmsg_fn();
- }
-
- inline char * __cdecl request_translate_uri(char * uri, PSession sn)
- {
- return servact_translate_uri(uri, sn);
- }
-
- inline PRequest __cdecl protocol_find_request(PNetBuf buf, PSession sn, int &reply)
- {
- return http_find_request(buf, sn, reply);
- }
-
- inline int __cdecl protocol_parse_request(char * t, PRequest rq, PSession sn)
- {
- return http_parse_request(t, rq, sn);
- }
-
- inline int __cdecl protocol_scan_headers(PSession sn, PNetBuf buf, char * t, PPblock headers)
- {
- return http_scan_headers(sn, buf, t, headers);
- }
-
- inline int __cdecl protocol_start_response(PSession sn, PRequest rq)
- {
- return http_start_response(sn, rq);
- }
-
- inline void __cdecl protocol_status(PSession sn, PRequest rq, int n, char * r)
- {
- http_status(sn, rq, n, r);
- }
-
- inline int __cdecl protocol_set_finfo(PSession sn, PRequest rq, TStat &finfo)
- {
- return http_set_finfo(sn, rq, finfo);
- }
-
- inline void __cdecl protocol_finish_request(PSession sn, PRequest rq)
- {
- http_finish_request(sn, rq);
- }
-
- inline void __cdecl protocol_handle_session(PSession sn)
- {
- http_handle_session(sn);
- }
-
- inline char * __cdecl protocol_uri2url(char * prefix, char * suffix)
- {
- return http_uri2url(prefix, suffix);
- }
-
- inline char * __cdecl protocol_uri2url_dynamic(char * prefix, char * suffix, PSession sn, PRequest rq
- )
- {
- return http_uri2url_dynamic(prefix, suffix, sn, rq);
- }
-
- inline void __cdecl protocol_set_keepalive_timeout(int secs)
- {
- http_set_keepalive_timeout(secs);
- }
-
-
- } /* namespace Nsapi */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Nsapi;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // NSApi
-